package com.stormrage.entity.edu;

import java.io.Serializable;

/**
 * @author www.stormragetech.com
 * @date 2016年4月2日
 * @version 1.0.0
 */
public class EduModule implements Serializable {

	// ------------------------------- Fields -------------------------------

	private static final long serialVersionUID = 980162838470129881L;

	// ------------------------------- Fields -------------------------------

	private Integer id; // 编号

	private String module; // 名称

	private String detail;

	private Integer ness;

	// ------------------------------- Fields -------------------------------

	public EduModule() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getModule() {
		return module;
	}

	public void setModule(String module) {
		this.module = module;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public Integer getNess() {
		return ness;
	}

	public void setNess(Integer ness) {
		this.ness = ness;
	}

	// ------------------------------- Fields -------------------------------

	public static EduModule instance(String module, String detail, Integer ness) {
		EduModule entity = new EduModule();
		entity.setModule(module);
		entity.setDetail(detail);
		entity.setNess(ness);
		return entity;
	}

	@Override
	public String toString() {
		return this.getClass() + " : id - " + id + " module - " + module + " detail - " + detail + " ness - " + ness;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		EduModule entity = (EduModule) o;

		if (id != null ? !id.equals(entity.id) : entity.id != null)
			return false;

		return true;
	}

	@Override
	public int hashCode() {
		return id != null ? id.hashCode() : 0;
	}

}
